Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Python] Fixing issues 5508 and 5512. Making sure profile dir path of type str un... #55

Closed
wants to merge 2 commits into from

Conversation

jayakumarc
Copy link
Contributor

Fixing issues 5508 and 5512. Making sure profile dir path of type str under both Py2 and Py3. Changing the way BytesIO imported so that str unicode swap actually happens under Py2.

Changes made:

I don't see any necessity to turn all the string literals in the file firefox_profile.py into unicode literals by importing unicode_literals, removing which makes sure that the profile dir path of type str under both Py2 and Py3. This fixes the issues 5508 and 5512 happening under Py2. A test has already been there to cover this scenario.

io module introduced in Python2.6 itself. Hence, changing the the way BytesIO imported so that the str and unicode swap would actually happen under Py2. This fixes the issue when try setting unicode profile preference under Py2.

Added 2 more firefox profile tests to make sure int and bool preferences are set properly.

EDIT: Updated the unicode preference setting test to make it functional under Py2.

… under both Py2 and Py3. Changing the way BytesIO imported so that str unicode swap actually happens under Py2.
from cStringIO import StringIO as BytesIO
bytes = str
str = unicode
except ImportError:
from io import BytesIO
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jayakumarc just curious, what's the reasoning behind changing the ordering of the imports?

@santiycr
Copy link
Contributor

Looks good to me

@AutomatedTester
Copy link
Member

This was landed a long time ago but our auto closing did kick in

yiming-tang-cs pushed a commit to ponder-lab/selenium that referenced this pull request Jan 2, 2020
Allow (no RST) but ignore out-of-order blocks for blockwise notifications.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants